﻿// <copyright file="PaginatedDto.cs" company="DatamineConsulting">
//      Copyright (c) DatamineConsulting.  All rights reserved.
// </copyright>
// <author>Sites, Ryan</author>
namespace Kanz4Kidz.DataTransfer
{
    using System.Collections.Generic;
    using Kanz4Kidz.DataTransfer.Interface;

    /// <summary>
    /// The implementation of a paginated data transfer object.
    /// </summary>
    /// <typeparam name="TDto">The type of the data transfer object.</typeparam>
    public class PaginatedDto<TDto> : IPaginatedDto<TDto> where TDto : IDto
    {

        /// <summary>
        /// Gets or sets the index of the page.
        /// </summary>
        /// <value>
        /// The index of the page.
        /// </value>
        public int PageIndex { get; set; }

        /// <summary>
        /// Gets or sets the size of the page.
        /// </summary>
        /// <value>
        /// The size of the page.
        /// </value>
        public int PageSize { get; set; }

        /// <summary>
        /// Gets or sets the total count.
        /// </summary>
        /// <value>
        /// The total count.
        /// </value>
        public int TotalCount { get; set; }

        /// <summary>
        /// Gets or sets the total page count.
        /// </summary>
        /// <value>
        /// The total page count.
        /// </value>
        public int TotalPageCount { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance has next page.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance has next page; otherwise, <c>false</c>.
        /// </value>
        public bool HasNextPage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance has previous page.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance has previous page; otherwise, <c>false</c>.
        /// </value>
        public bool HasPreviousPage { get; set; }

        /// <summary>
        /// Gets or sets the items.
        /// </summary>
        /// <value>
        /// The items.
        /// </value>
        public IEnumerable<TDto> Items { get; set; }
    }
}
